#include<stdio.h>
#include<stdlib.h>

const char* FileName ="/dev/pts/1";

int main()
{
    FILE* pfile = fopen(FileName,"w");
    if(!pfile)
    {
        perror("open file fail");
        fclose(pfile);
        exit(1);
    }
    const char* content = "hello linhui!!!";
    int count = 10;
    while(count--)
    {
        fprintf(pfile,"%s",content);
        fprintf(pfile,"\n");
    }

    fclose(pfile);


    return 0;
}
